import request from '@/utils/request'
// 获取评论或评论回复
export const getCommentList = params => request({
  url: '/v1_0/comments',
  method: 'GET',
  params
})

// 对评论或评论回复点赞
export const addLike = target => request({
  url: '/v1_0/comment/likings',
  method: 'POST',
  data: {
    target
  }
})

// 取消对评论或评论回复点赞
export const delLike = target => request({
  url: '/v1_0/comment/likings/' + target,
  method: 'DELETE'
})

// 添加评论或评论回复
export const addComment = data => request({
  url: '/v1_0/comments',
  method: 'POST',
  data
})
